<html lang="zh">

<head>
    <title>{{ title }}</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
        .uk-navbar-sticky {
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.09) !important;
        }
    </style>
    <style media="print">
        /* 禁止打印 */
        body {
            display: none
        }
    </style>
    <style>
        /* 表格垂直居中 */
        table td {
            vertical-align: middle !important;
        }
    </style>
    <link rel="shortcut icon" href="https://uploadfile.huiyi8.com/up/65/bf/27/65bf2795ee640846dba996758bca188a.png">
    <!-- UIkit CSS -->
    <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/uikit@3.21.12/dist/css/uikit.min.css" />
    <!-- UIkit JS -->
    <script src="https://fastly.jsdelivr.net/npm/uikit@3.21.12/dist/js/uikit.min.js"></script>
    <script src="https://fastly.jsdelivr.net/npm/uikit@3.21.12/dist/js/uikit-icons.min.js"></script>
    <link rel="stylesheet" type="text/css" href="https://fastly.jsdelivr.net/gh/alphardex/aqua.css/dist/aqua.min.css" />

    {% load static %}
</head>

<body class="uk-background-muted">

    <!-- MOBI Nav -->
    <div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent;"
        class="uk-sticky uk-sticky-below uk-sticky-fixed" style="position: fixed; top: 0px; width: 1905px;">
        <nav class="uk-navbar uk-navbar-container uk-margin uk-hidden@m uk-navbar-sticky" style="height: 80px;">
            <div class="uk-navbar-right">
                <a class="uk-navbar-toggle uk-icon uk-navbar-toggle-icon" uk-navbar-toggle-icon="" href="#m-nav"
                    uk-toggle="">
                    <rect y="9" width="20" height="2"></rect>
                    <rect y="3" width="20" height="2"></rect>
                    <rect y="15" width="20" height="2"></rect>
                </a>
            </div>
        </nav>
    </div>

    <div class="uk-sticky-placeholder" style="height: 0px; margin: 0px;" hidden=""></div>
    <!-- PC Nav -->
    <div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent;"
        class="uk-sticky uk-navbar-sticky uk-sticky-below uk-sticky-fixed">
        <nav class="uk-visible@m uk-background-secondary uk-light uk-navbar" uk-navbar="">
            <div class="uk-navbar-left">
                <a class="uk-navbar-item uk-logo" href="/">
                    <img src="/static/home/imgs/logo.png" style="height: 60px;margin-left:15px;border-radius: 10%;">
                </a>
                <ul class="uk-navbar-nav">
                    <li class="uk-active"><a href="/">首页</a></li>
                </ul>
            </div>
            <div class="uk-navbar-right">
                {% if username %}
                <ul class="uk-navbar-nav" style="margin-right: 2em;">
                    <li><button class="uk-button uk-button-text">
                            <a href="" target="_blank">{{ username }}
                                <div class="flex flex-col items-center space-y-4">
                                    <div>
                                        <span class="avatar">
                                            <img src="{{ myuser.avatar }}" alt="">
                                        </span>
                                    </div>
                                </div>
                            </a>

                        </button>
                        <div class="uk-navbar-dropdown">
                            <ul class="uk-nav uk-navbar-dropdown-nav">
                                <li>
                                    <a href="" target="_blank"
                                        class="uk-button uk-button-primary uk-margin-small-left uk-border-pill">个人中心</a>
                                </li>
                                {% if superuser %}
                                <li>
                                    <a href="/admin" target="_blank"
                                        class="uk-button uk-button-primary uk-margin-small-left uk-border-pill">后台管理</a>
                                </li>
                                {% endif %}
                                <li class="uk-active">
                                    <a class="uk-button uk-button-primary uk-margin-small-left uk-border-pill"
                                        href="/logout">退出</a>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
                {% else %}
                <div class="uk-navbar-item uk-visible@l">
                    <button class="uk-button uk-button-text">
                        <a class="uk-button uk-button-text" href="/login">
                            登录
                        </a>
                    </button>
                    <a class="uk-button uk-button-primary uk-margin-small-left uk-border-pill" href="/register">注册</a>
                </div>
                {% endif %}
            </div>
        </nav>
    </div>
    <div class="uk-sticky-placeholder" hidden style="height: 80px; margin: 0px;"></div>




    <!-- m-nav -->
    <div id="m-nav" uk-offcanvas="overlay: true" class="uk-offcanvas">
        <div class="uk-offcanvas-bar">
            <button class="uk-offcanvas-close uk-icon uk-close" type="button" uk-close="">
                <line fill="none" stroke="#000" stroke-width="1.1" x1="1" y1="1" x2="13" y2="13"></line>
                <line fill="none" stroke="#000" stroke-width="1.1" x1="13" y1="1" x2="1" y2="13"></line>
            </button>
            <ul class="uk-nav-default uk-nav-parent-icon uk-nav" uk-nav="">
                <li class="uk-active"><a href="/"><span class="uk-margin-small-right uk-icon" uk-icon="icon: home">
                            <polygon points="18.65 11.35 10 2.71 1.35 11.35 0.65 10.65 10 1.29 19.35 10.65">
                            </polygon>
                            <polygon points="15 4 18 4 18 7 17 7 17 5 15 5"></polygon>
                            <polygon
                                points="3 11 4 11 4 18 7 18 7 12 12 12 12 18 16 18 16 11 17 11 17 19 11 19 11 13 8 13 8 19 3 19">
                            </polygon>
                        </span>
                        首页</a></li>
                </li>
                {% if username %}
                <li class="uk-parent">
                    <a href="/userhome"><span class="uk-margin-small-right uk-icon" uk-icon="icon: user"></span>
                        个人中心</a>
                    <ul class="uk-nav-sub" hidden="" aria-hidden="true">
                        <li>
                            <a href="/userhome">个人中心</a>
                        </li>
                        {% if superuser %}
                        <li>
                            <a href="/admin">后台管理</a>
                        </li>
                        {% endif %}
                        <li class="uk-active">
                            <a href="/logout">退出</a>
                        </li>
                    </ul>
                    {% endif %}
                </li>

                <li class="uk-nav-divider"></li>
                {% if username %}
                <div class="uk-navbar-item uk-visible@l">
                    <button class="uk-button uk-button-text">
                        {{ username }}
                    </button>
                    <a class="uk-button uk-button-primary uk-margin-small-left uk-border-pill" href="/logout">退出</a>
                </div>
                {% else %}
                <div class="uk-navbar-item uk-visible@l">
                    <button class="uk-button uk-button-text">
                        <a class="uk-button uk-button-text" href="/login">
                            登录
                        </a>
                    </button>
                    <a class="uk-button uk-button-primary uk-margin-small-left uk-border-pill" href="/register">注册</a>
                </div>
                {% endif %}
        </div>
        </ul>
    </div>
    </div>
    {% if message_danger %}
    <div class="uk-alert-danger uk-text-center" uk-alert>
        <a class="uk-alert-close" uk-close></a>
        <p>{{ message_danger }}</p>
    </div>
    {% elif message_success %}
    <div class="uk-alert-success uk-text-center" uk-alert>
        <a class="uk-alert-close" uk-close></a>
        <p>{{ message_success }}</p>
    </div>
    {% endif %}
    {% block index %}

    {% endblock %}
</body>

</html>